package com.kaka.bus.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class ProductDetailBean implements Parcelable {


    /**
     * flag : 0
     * jdUrl : http://172.16.11.77:8082/dc-loan-app/form/jdCard/13122578489/?prodType=pay_money
     * product : [{"amountUnit":"天","flag":"0","jdUrl":"http://172.16.11.77:8082/dc-loan-app/form/jdCard/13122578489/?prodType=pay_money","loanAmount":1500,"periodUnit":7,"productCount":"1","productIcon":"http://10.0.2.164/group1/M01/1B/67/CgACpFt03BGAbjFjAAAYQEBeVRQ093.png","productId":4,"productName":"随心贷","productType":1,"subhead":"随借随还 极速到账"},{"amountUnit":"天","flag":"0","jdUrl":"http://172.16.11.77:8082/dc-loan-app/form/jdCard/13122578489/?prodType=pay_money","loanAmount":2000,"periodUnit":7,"productCount":"1","productIcon":"http://10.0.2.164/group1/M01/1B/67/CgACpFt03BGAbjFjAAAYQEBeVRQ093.png","productId":5,"productName":"随心贷","productType":1,"subhead":"随借随还 极速到账"}]
     * productCount : 1
     * productIcon : http://10.0.2.164/group1/M01/1B/67/CgACpFt03BGAbjFjAAAYQEBeVRQ093.png
     * productId : 1
     * productName : 随心贷
     * productType : 1
     * subhead : 随借随还 极速到账
     * amountUnit : 月
     * estimatedAmount : 0.0
     * loanAmount : 0.0
     * period : 1
     */
    private String businessId;
    private String id;
    private String isSelf;
    private String enable;
    private String remark;
    private String productTypeName;
    private String renewServiceFee;
    private String serviceFee;
    private String productTypeCode;
    private String productDescription;
    private String headline;
    private String requestUrl;
    private String estimatedAmount;
    private String flag;
    private int period;
    private String jdUrl;
    private int productCount;
    private String productIcon;
    private int productId;
    private String productName;
    private int productType;
    private String subhead;
    private String amountUnit;
    private String loanAmount;

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIsSelf() {
        return isSelf;
    }

    public void setIsSelf(String isSelf) {
        this.isSelf = isSelf;
    }

    public String getEnable() {
        return enable;
    }

    public void setEnable(String enable) {
        this.enable = enable;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getProductTypeName() {
        return productTypeName;
    }

    public void setProductTypeName(String productTypeName) {
        this.productTypeName = productTypeName;
    }

    public String getRenewServiceFee() {
        return renewServiceFee;
    }

    public void setRenewServiceFee(String renewServiceFee) {
        this.renewServiceFee = renewServiceFee;
    }

    public String getServiceFee() {
        return serviceFee;
    }

    public void setServiceFee(String serviceFee) {
        this.serviceFee = serviceFee;
    }

    public String getProductTypeCode() {
        return productTypeCode;
    }

    public void setProductTypeCode(String productTypeCode) {
        this.productTypeCode = productTypeCode;
    }

    public String getProductDescription() {
        return productDescription;
    }

    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription;
    }

    public String getHeadline() {
        return headline;
    }

    public void setHeadline(String headline) {
        this.headline = headline;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getEstimatedAmount() {
        return estimatedAmount;
    }

    public void setEstimatedAmount(String estimatedAmount) {
        this.estimatedAmount = estimatedAmount;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public int getPeriod() {
        return period;
    }

    public void setPeriod(int period) {
        this.period = period;
    }

    public String getJdUrl() {
        return jdUrl;
    }

    public void setJdUrl(String jdUrl) {
        this.jdUrl = jdUrl;
    }

    public int getProductCount() {
        return productCount;
    }

    public void setProductCount(int productCount) {
        this.productCount = productCount;
    }

    public String getProductIcon() {
        return productIcon;
    }

    public void setProductIcon(String productIcon) {
        this.productIcon = productIcon;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public int getProductType() {
        return productType;
    }

    public void setProductType(int productType) {
        this.productType = productType;
    }

    public String getSubhead() {
        return subhead;
    }

    public void setSubhead(String subhead) {
        this.subhead = subhead;
    }

    public String getAmountUnit() {
        return amountUnit;
    }

    public void setAmountUnit(String amountUnit) {
        this.amountUnit = amountUnit;
    }

    public String getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(String loanAmount) {
        this.loanAmount = loanAmount;
    }

    public List<ProductBean> getProduct() {
        return product;
    }

    public void setProduct(List<ProductBean> product) {
        this.product = product;
    }

    private List<ProductDetailBean.ProductBean> product;
    public static class ProductBean implements Parcelable {

        /**
         * amountUnit : 天
         * flag : 0
         * jdUrl : http://172.16.11.77:8082/dc-loan-app/form/jdCard/13122578489/?prodType=pay_money
         * loanAmount : 1500.0
         * periodUnit : 7
         * productCount : 1
         * productIcon : http://10.0.2.164/group1/M01/1B/67/CgACpFt03BGAbjFjAAAYQEBeVRQ093.png
         * productId : 4
         * productName : 随心贷
         * productType : 1
         * subhead : 随借随还 极速到账
         */
        private String enabledClick;

        public String getEnabledClick() {
            return enabledClick;
        }

        public void setEnabledClick(String enabledClick) {
            this.enabledClick = enabledClick;
        }

        private String amountUnit;
        private String flag;
        private String jdUrl;
        private String loanAmount;
        private int periodUnit;
        private String productCount;
        private String productIcon;
        private int productId;
        private String productName;
        private int productType;
        private String subhead;

        public String getAmountUnit() {
            return amountUnit;
        }

        public void setAmountUnit(String amountUnit) {
            this.amountUnit = amountUnit;
        }

        public String getFlag() {
            return flag;
        }

        public void setFlag(String flag) {
            this.flag = flag;
        }

        public String getJdUrl() {
            return jdUrl;
        }

        public void setJdUrl(String jdUrl) {
            this.jdUrl = jdUrl;
        }

        public String getLoanAmount() {
            return loanAmount;
        }

        public void setLoanAmount(String loanAmount) {
            this.loanAmount = loanAmount;
        }

        public int getPeriodUnit() {
            return periodUnit;
        }

        public void setPeriodUnit(int periodUnit) {
            this.periodUnit = periodUnit;
        }

        public String getProductCount() {
            return productCount;
        }

        public void setProductCount(String productCount) {
            this.productCount = productCount;
        }

        public String getProductIcon() {
            return productIcon;
        }

        public void setProductIcon(String productIcon) {
            this.productIcon = productIcon;
        }

        public int getProductId() {
            return productId;
        }

        public void setProductId(int productId) {
            this.productId = productId;
        }

        public String getProductName() {
            return productName;
        }

        public void setProductName(String productName) {
            this.productName = productName;
        }

        public int getProductType() {
            return productType;
        }

        public void setProductType(int productType) {
            this.productType = productType;
        }

        public String getSubhead() {
            return subhead;
        }

        public void setSubhead(String subhead) {
            this.subhead = subhead;
        }

        public ProductBean() {
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.enabledClick);
            dest.writeString(this.amountUnit);
            dest.writeString(this.flag);
            dest.writeString(this.jdUrl);
            dest.writeString(this.loanAmount);
            dest.writeInt(this.periodUnit);
            dest.writeString(this.productCount);
            dest.writeString(this.productIcon);
            dest.writeInt(this.productId);
            dest.writeString(this.productName);
            dest.writeInt(this.productType);
            dest.writeString(this.subhead);
        }

        protected ProductBean(Parcel in) {
            this.enabledClick = in.readString();
            this.amountUnit = in.readString();
            this.flag = in.readString();
            this.jdUrl = in.readString();
            this.loanAmount = in.readString();
            this.periodUnit = in.readInt();
            this.productCount = in.readString();
            this.productIcon = in.readString();
            this.productId = in.readInt();
            this.productName = in.readString();
            this.productType = in.readInt();
            this.subhead = in.readString();
        }

        public static final Creator<ProductBean> CREATOR = new Creator<ProductBean>() {
            @Override
            public ProductBean createFromParcel(Parcel source) {
                return new ProductBean(source);
            }

            @Override
            public ProductBean[] newArray(int size) {
                return new ProductBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.businessId);
        dest.writeString(this.id);
        dest.writeString(this.isSelf);
        dest.writeString(this.enable);
        dest.writeString(this.remark);
        dest.writeString(this.productTypeName);
        dest.writeString(this.renewServiceFee);
        dest.writeString(this.serviceFee);
        dest.writeString(this.productTypeCode);
        dest.writeString(this.productDescription);
        dest.writeString(this.headline);
        dest.writeString(this.requestUrl);
        dest.writeString(this.estimatedAmount);
        dest.writeString(this.flag);
        dest.writeInt(this.period);
        dest.writeString(this.jdUrl);
        dest.writeInt(this.productCount);
        dest.writeString(this.productIcon);
        dest.writeInt(this.productId);
        dest.writeString(this.productName);
        dest.writeInt(this.productType);
        dest.writeString(this.subhead);
        dest.writeString(this.amountUnit);
        dest.writeString(this.loanAmount);
        dest.writeTypedList(this.product);
    }

    public ProductDetailBean() {
    }

    protected ProductDetailBean(Parcel in) {
        this.businessId = in.readString();
        this.id = in.readString();
        this.isSelf = in.readString();
        this.enable = in.readString();
        this.remark = in.readString();
        this.productTypeName = in.readString();
        this.renewServiceFee = in.readString();
        this.serviceFee = in.readString();
        this.productTypeCode = in.readString();
        this.productDescription = in.readString();
        this.headline = in.readString();
        this.requestUrl = in.readString();
        this.estimatedAmount = in.readString();
        this.flag = in.readString();
        this.period = in.readInt();
        this.jdUrl = in.readString();
        this.productCount = in.readInt();
        this.productIcon = in.readString();
        this.productId = in.readInt();
        this.productName = in.readString();
        this.productType = in.readInt();
        this.subhead = in.readString();
        this.amountUnit = in.readString();
        this.loanAmount = in.readString();
        this.product = in.createTypedArrayList(ProductBean.CREATOR);
    }

    public static final Parcelable.Creator<ProductDetailBean> CREATOR = new Parcelable.Creator<ProductDetailBean>() {
        @Override
        public ProductDetailBean createFromParcel(Parcel source) {
            return new ProductDetailBean(source);
        }

        @Override
        public ProductDetailBean[] newArray(int size) {
            return new ProductDetailBean[size];
        }
    };
}
